Home Control

Why should I read this article?

You may not have realized it, but your home has built-in local area network cabling (the electrical or phone wiring). This article discusses how to turn your appliances into smart devices hooked into that local area network. If you desire, you can also link that network to the outside world via telephone or wireless communications. If you would like to save money on your energy bills, or are going away on vacation and would like to be able to turn lights on and off in your absence, this article will interest you.

What do I need?

If your primary interest is home control,  you will need to purchase some  X-10 appliance modules (which can receive events), and at least one controller, or security module that can send events. 

If you purchase the X-10 compatible CP290 computer interface module, software for your Macintosh is included with the interface. The software can control up to 16 devices, turning them on or off at preselected times. Since the CP290 has its own processor and memory, once it is programmed, it does not have to continue to be attached to your computer for it to work. 

A CP290, a few appliance modules , and one of the home security bundles will suffice to put together a reasonable home security system. 

If your primary interest is industrial control, then the Radiant system is more appropriate. Radiant’s Common Sense Node (which supports 8 programmable digital inputs/outputs, 4 analog inputs, and 4 power relay outputs) comes with Macintosh software. 

The Return of the Refrigerator SIG

Back in 1984, Steve Jobs introduced a computer so simple there would be no need for user groups. “There are no user groups for refrigerators, are there?” he was reported to have said.  Seven years and hundreds of thousands of user group memberships later, the User Group movement shows no signs of abating.
 
In 1987, a group on the ECHOMAC conference got a good laugh out of imagining what would have happened had Steve Jobs decided to design a refrigerator instead of the Mac. They concluded that there would now be refrigerator user groups, taking calls from starving users trying to figure out how to recover food from their computerized iceboxes. The group nicknamed themselves “The Refrigerator SIG.”

It was only a matter of time before the other shoe dropped. The era of the smart lamp, thermostat, and sprinkler is already here. Can the smart refrigerator be far behind? This article talks about the current home control standard, X-10. It also talks about future standards, such as Radiant, CEBus, and LON, which will usher in the era of the Smart Refrigerator.  You mark my words!

The History of Home Control

X-10 Home Controls, Inc. has been in the home control business since 1978. Even so, their devices have not been manufactured inexpensively or distributed widely until the last few years. 

X-10 based products transmit their signals primarily over home electrical wiring; because the transmission scheme is fairly primitive, it is only possible to transmit at 60 bits per second. At this rate, transmission of complex commands is very difficult. As a result, the X-10 protocols are designed to allow only very simple commands, like: all units off, all lights on, on, off, dim, and bright. The last four commands are to be directed to a specific unit, identified with a house code, which runs from A to P, and a number, which runs from 1-16. Altogether, 256 devices can be on the bus. 

In contrast, future home control technologies such as Radiant, LON and CEBus will transmit at much higher rates. Radiant is based on AppleTalk protocols running over twisted pair wiring, and therefore runs at 230.4 kbps. The most recently adopted version of the power line specification for CEBus tops out at around 10,000 bps, which is enough to transmit data from many types of sensors, and possibly even voice or graphics. CEBus over other  media, such as infrared and twisted pair  also transmit at similar rates. 

Rather than just allowing for sending of simple commands like on or off, CEBus and Radiant implement an OSI protocol stack with 7 layers. In the case of Radiant, the protocol stack is AppleTalk, with HyperCard XCMDs to send messages to the control devices. The LONTalk specification, produced by EcheLON, also is implemented according to the OSI model. This means that fairly complex client/server communications can occur over Radiant, CEBus or LON.

A major difference between Radiant, CEBus and LON is the degree of implementation in hardware. Since Radiant is based on AppleTalk, other than a Zilog 8530 chip used to implement the physical layer, the rest of the protocol stack is implemented in software. This means that Radiant devices are relatively simple to design, and inexpensive to produce. Also, since all Macintosh computers come with AppleTalk built in, every Macintosh ever made is capable of communicating with Radiant devices without the need to purchase special interface hardware. 

With LON, all the layers but the application layer are implemented in hardware. This means that LON is likely to be quite fast. However, it is doubtful that control systems really need speeds much above the 230.4 kbps available with Radiant’s AppleTalk based system. In addition, since no computers come with LON built in, special interface hardware is needed to connect the computer to the LON network. 

With CEBus, it is not yet clear how many levels of the protocol stack will be hardware based. 

Although CEBus looked like the early favorite, they have spent the last year ironing out compatibility problems in the power line standard between the proposed spec and the X-10 protocols. As a result, they have had to throw out chip designs that had gone all the way to manufacture. Overall, they are no further along than they were a year ago, while LON has been rolling along, shipping hardware and developer's kits. 

Looking back over the history of the computer industry, industry standards committees have a sad history when pitted against single minded developers. My guess is that EcheLON has the edge at this point. 

Radiant, a recent San Francisco based startup, is a clear underdog in the battle against CEBus and LON. However their technology is simpler, less expensive, and easier to develop for. Anyone with access to a Macintosh,  Think C, and AppleTalk documentation can become a Radiant developer. Meanwhile LON is charging big $ for their development kits. 

Media, Media on the Wall

Home control standards like X-10, Radiant, CEBus and LON are all mini-local area networks. As such they need a medium over which to transmit their signals. Since home control needs to be inexpensive and easy to use for people to use it, it wouldn't make sense to require expensive cabling. 

For this reason home control networks most often utilize common media like the electrical wiring in the house, twisted pair phone wire, infrared or radio wave propagation. Before you set out to do a home control project however, you should be aware that these media have certain limitations.

For example, very often the electrical wiring in a house is not continuous. That is, X-10 signals sent from a wall outlet in one part of the house may not be able to reach outlets in another part of the house. This can happen if your home is wired so that those outlets are on different circuits, which is very common. 

Twisted pair phone wire will only work in an office where one of the pairs is not being utilized, and is therefore available for an AppleTalk network. 

Similarly, radio waves or infrared communications is not foolproof either; you may find that you will need to vary the direction at which you point your remote control device, or need to actuate the device repeatedly, before the signal is picked up correctly. 

X-10 products, particularly simpler ones such as the appliance modules, are well made and durable. Others, such as Window Sensors, need to be maintained so that they do not fire accidentally. However, none of the modules were designed for industrial use, or for constant abuse from children. More complex modules such as burglar alarms need to be maintained and checked regularly so that they will continue to function reliably. 

For these reasons it is not advisable to operate potentially hazardous appliances such as an electric oven or a coffee maker using home control equipment. If a malfunction could be catastrophic, you need retain responsibility for vigilance yourself, not delegate it to a computer. 

How the X-10 System Works

Those who have ever programmed a Mac, have scripted in HyperCard, or know something about object oriented programming can relate to the fundamental concept of the X-10 Home Control System, events.

How are the events transmitted? The X-10 system operates over two media: the electrical wiring in your home, and via the airwaves.

The X-10 system is built around individual modules which can send and receive events. What are these events? Well, the X-10 system is not very sophisticated, so the events are on, off, dim, bright, all units off, and all lights on. That's it!

Doesn't sound very powerful does it? Well, there you would be wrong, because depending on the device, it can interpret the events any way it chooses. Therefore while a lamp could turn itself on when it receives an on event, a siren could put out an ear numbing screech.

However, you would be right in concluding that the X-10 system is not sophisticated enough to control devices such as stereos, TV's, microwave ovens, or other appliances that need to be sent instructions much more complex than on, off, or dim to be told what to do. It also cannot send numerical data, such as the temperature, humidity, etc. from one sensor to another.

These shortcomings are addressed by the competing standards for the next generation in home control, Radiant, CEBUS, and LON. However, those standards have not yet produced inexpensive, mass marketed products, and X-10 has. Today for $100 you can purchase a powerful X-10 burglar alarm, or a complete appliance or thermostat control system, controlled by your computer. 

X-10 modules typically plug into an electrical outlet, and use the wiring of your home to transmit and receive events. They do this by sending signals at the zero crossing of the 60 Hz power line. Several modules can also send and receive messages over the airwaves. For example, the Home Security System Base Receiver can receive commands from a remote control unit to turn the home security system on or off.

There are several classes of X-10 modules. One of these is the sensor module. These would include things like motion sensors, and window/door sensors. These sensors send an on event when they are triggered, but they cannot receive events. Also in this class are timer modules, which send events depending on time of day, and sun downer  modules, which send them depending on the received light.

Another class is the appliance module. These are things like the lamp module, or the general appliance module. These modules plug into your electrical outlet, and then you plug your appliance into them. These modules can only receive events, and when they do, they turn the appliances plugged into them on or off. There are also wall modules that you can build into the wall. Also in the appliance module class is the thermostat module. Since your thermostat cannot plug into this module,the module is placed underneath your thermostat, and generates (or stops generating) heat. This convinces the thermostat to turn on or off.

In another class are the gateway modules. These modules are used to gateway X-10 commands between the electrical system (which the appliance modules are connected to) and other media such as the telephone system (the telephone responder module) or the airwaves (remote control modules). This means you can turn your lights on or off by phone, or via remote control from outside the house. Getting interested?

Each X-10 device capable of receiving events has an address that is assigned by turning two dials on the module. Setting these dials is a little reminiscent of setting the SCSI ID on some hard drives. The addresses do not necessarily have to be unique, because most modules only read from the wiring, but do not write information to it. Therefore there is no possibility of contention for media access. You give modules the same address if you want the attached appliances to respond identically to a command.  

Once you've plugged the appliance modules into outlets, plugged the appliances into the modules, and given the modules unique addresses you're ready to use the CP290 software.